#ifndef __REGION_HPP__
#define __REGION_HPP__

#include <cmath>
#include <limits>
#include <vector>
#include <list>
#include <map>
#include <set>
#include <unordered_set>
#include <unordered_map>
#include <queue>
#include <string>
#include <iostream>
#include <fstream>
#include <algorithm>

#include <Eigen/Dense>

#include "village.hpp"

using namespace std;
using namespace Eigen;

class Region
{
private:
    /* data */
    std::vector<Village> villages; // TODO: may need to sort the vector by _id

public:
    Region();
    Region(string path);
    //~Region();

    void load_yaml(string yaml_path);
    void load_json(string json_path);

    vector<Village> get_region();
    Village* get_village(int id);
    bool set_village(int id, double x, double y);
    bool add_village(Village v);
    bool add_village(int id, double x, double y);
    bool del_village(int id);
};

#endif  /* __REGION_HPP__ */